Skip to content

feat: allow RQ 3 - #155

Merged
adamlogic merged 2 commits into
judoscale:mainfrom
itzzdev09:allow-rq-3
Dec 1, 2026
Merged

adamlogic merged 2 commits into
judoscale:mainfrom
itzzdev09:allow-rq-3

Conversation

@itzzdev09

Copy link
Copy Markdown
Contributor

RQ 3.0.0 came out on 2026-10-28, and the rq extra caps it at <3.0.0, so judoscale[rq] can't be installed next to it.

This raises the cap to <4.0.0. poetry.lock only changes its content-hash (Poetry 1.8.4, poetry lock --no-update), so CI still runs against the locked RQ 2.

The collector itself works unchanged on RQ 3. The one test difference is that Job.key_for() now returns a str instead of bytes, so test_collect_with_busy_job_tracking builds the expected started_at keys with Job.key_for(). That passes on both versions.

Checked:

  • poetry run pytest: 234 passed with the locked RQ 2.3.3, and 234 passed after pip install "rq==3.*". Before the test change, 3 busy-job test cases failed on RQ 3 (the str/bytes key comparison only).
  • Live run against Redis 7 with a real rq worker and one running job plus one queued job. RQMetricsCollector.collect() gives the same metrics on RQ 2.12.0 and 3.0.0 (busy 1, bt ≈ 5.8 s, qt, qd 1). The rq:wip:<queue> entries keep the <job_id>:<execution_id> format, and started_at is still saved on the job hash.

itzzdev09 and others added 2 commits November 26, 2026 02:06
RQ 3.0.0 was released on 2026-10-28. The collector works unchanged with it; the only difference in the RQ tests is that Job.key_for() returns a str instead of bytes, so the busy-jobs test now builds the expected keys with Job.key_for().
Lock RQ 3 so CI runs the tests against it, and add a CI step that also
runs them against RQ 2. Move the Flask RQ sample app to RQ 3, and update
the collector comments about which RQ versions store what.

Amp-Thread-ID: https://ampcode.com/threads/T-01a23198-b2c3-750b-8c0f-f8ec8119c047
Co-authored-by: Adam McCrea <[email protected]>
@adamlogic
adamlogic merged commit 2ef9d09 into judoscale:main Dec 1, 2026
5 checks passed
@adamlogic

Copy link
Copy Markdown
Member

Thanks!

adamlogic pushed a commit that referenced this pull request Dec 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.18.0](v1.17.0...v1.18.0)
(2026-12-01)


### Features

* allow RQ 3
([#155](#155))
([2ef9d09](2ef9d09))
* ignore queue time for requests with large bodies
([#157](#157))
([a00afd7](a00afd7))


### Documentation

* correct the default log level in the README
([#156](#156))
([77bc5bd](77bc5bd))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants